package tools;

import java.awt.LayoutManager;

import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.JTextField;

import orgamenu.m2vc.actions.AbstractBaseAction;



public class UITools {

	
	public static JTextField createTextField(int lg){
		return new JTextField(lg);		
	}
	
	public static JTextField createTextField(String txt){
		return new JTextField(txt);		
	}
	
	public static JComboBox createCombo(String[] tab){
		return new JComboBox(tab);		
	}
	
	public static JLabel createLabel(String txt){
		return new JLabel(txt);		
	}
	
	public static JPanel createTabPanel(LayoutManager lm){
		return new JPanel(lm);		
	}
	
	public static JTextArea createTextArea(String txt){
		return new JTextArea(txt);		
	}
	public static JTextArea createTextArea(int rows,int col){
		return new JTextArea(rows,col);		
	}
	
	public static JButton createButton(String nom, AbstractBaseAction action,String tooltip){
		JButton button = new JButton(action);	
		button.setText(nom);
		button.setToolTipText(tooltip);
		return 	button;
	}

}
